package com.yxq.mdt.app.modules.classification.ui;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yxq.mdt.app.R;
import com.yxq.mdt.app.glide.GlideHelper;
import com.yxq.mdt.app.modules.classification.bean.ClassificationBean;

import java.util.List;

/**
 * @author L
 * @time 2019-10-21
 * @describe 全部分类二级分类列表
 */
public class ClassificationChildMenuListAdapter extends BaseQuickAdapter<ClassificationBean.ListBeanX.ListBean, BaseViewHolder> {


    public ClassificationChildMenuListAdapter(int layoutResId, @Nullable List<ClassificationBean.ListBeanX.ListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ClassificationBean.ListBeanX.ListBean item) {


        helper.setText(R.id.main_item_tv_grid_title, item.getName());
        GlideHelper.setLoadImage(mContext, item.getPic_url(), R.color.gray, helper.getView(R.id.main_item_iv_grid_icon));
    }
}
